﻿using Quartz;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Wicresoft.Task.EmployeeSync;
using Topshelf;

namespace Wicresoft.EKA.Sync.ConsoleTest
{
    class Program
    {
        static void Main(string[] args)
        {

            HostFactory.Run(x =>
                                {
                                    x.RunAsLocalSystem();

                                    x.SetDescription(Configuration.ServiceDescription);
                                    x.SetDisplayName(Configuration.ServiceDisplayName);
                                    x.SetServiceName(Configuration.ServiceName);

                                    x.Service(factory =>
                                                  {
                                                      QuartzServer server = new QuartzServer();
                                                      server.Initialize();
                                                      return server;
                                                  });
                                });
        

            //IJob job1 = new EmployeeSyncTask();
            //job1.Execute(null);
            //Console.ReadLine();

        }

        //static void Create(TestStringModel source, TestStringModel destination)
        //{
        //    Console.WriteLine(source.Key + "  Create");
        //}


        //static void Modify(TestStringModel source, TestStringModel destination)
        //{
        //    Console.WriteLine(source.Key + "  Modify");
        //}


        //static void Delete(TestStringModel source, TestStringModel destination)
        //{
        //    Console.WriteLine(destination.Key + "  Delete");
        //}
    }
}
